﻿using System;
using System.Collections.Generic;
using Acaweb.Data.Contracts;
using Acaweb.Model.Entities;
using Acaweb.Model.Entities.DatosCompuestos;
using Spring.Transaction.Interceptor;
using System.Linq.Expressions;

namespace Acaweb.Data.Dao.NHibernate
{
    public class RepresentantesDao : HibernateDao<Representantes, string>, IRepresentantesDao
    {
        public IList<Representantes> GetAll()
        {
            return this.GetAll<Representantes>();
        }

        public void Delete(string obj)
        {
            this.Delete(obj);
        }

        public IList<Representantes> GetRepresentantes(bool IsDocente)
        {
            int isDocente = IsDocente ? 1 : 0;

            return this.Session.QueryOver<Representantes>().Where(t => t.IsDocente == isDocente).List();
        }
    }
}